package org.jeecg.modules.car.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.entity.basedata.BaseProject;
import org.jeecg.entity.car.CarPort;
import org.jeecg.modules.car.mapper.CarPortMapper;
import org.jeecg.modules.car.service.ICarPortService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: 车位管理
 * @Author: jeecg-boot
 * @Date:   2020-08-26
 * @Version: V1.0
 */
@Service
public class CarPortServiceImpl extends ServiceImpl<CarPortMapper, CarPort> implements ICarPortService {

    @Autowired
    CarPortMapper carPortMapper;

    @Override
    public List<CarPort> getCarPortByCarParkId(String parkId){
        return carPortMapper.getCarPortByCarParkId(parkId);
    }

    @Override
    public CarPort getByParkIdAndPortNum(String parkId, String carportNum) {
        return carPortMapper.getByParkIdAndPortNum(parkId,carportNum);
    }

    @Override
    public List<CarPort> findPage(Page<CarPort> page, CarPort carPort) {
        return carPortMapper.findPage(page,carPort);
    }

    @Override
    public BaseProject getProjectByName(String projectName) {
        return carPortMapper.getProjectByName(projectName);
    }

    @Override
    public CarPort queryById(String id, String tenantId){
        return carPortMapper.queryById(id, tenantId);
    }

    @Override
    public List<CarPort> findByParkId(String parkId){
        return carPortMapper.findByParkId(parkId);
    }

    @Override
    public List<CarPort> queryCarPortName(String parkId){
        return carPortMapper.queryCarPortName(parkId);
    }

}
